/*
 * Copyright (C), 2002-2017, 苏宁易购电子商务有限公司
 * FileName: ExportCustomerDaoImpl.java
 * Author:   15060460
 * Date:     2017年4月14日 下午2:26:50
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.suning.sawp.member.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.suning.framework.dal.client.DalClient;
import com.suning.sawp.member.dao.ExportCustomerDao;
import com.suning.sawp.member.vo.ExportCustomerVo;

/**
 * 〈一句话功能简述〉<br> 
 * 〈功能详细描述〉
 *
 * @author 15060460
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Repository
public class ExportCustomerDaoImpl implements ExportCustomerDao {
    
    @Autowired
    DalClient dalClient;

    /* (non-Javadoc)
     * @see com.suning.sawp.member.dao.ExportCustomerDao#queryCustormerForDz(java.lang.String, java.lang.String)
     */
    @Override
    public List<ExportCustomerVo> queryCustormerForDz(String activityId, String storeCode,String cateCode,String memSource,String expandId) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("activityId", activityId);
        paramMap.put("storeCode", storeCode);
        if(StringUtils.isNotEmpty(cateCode)){
            paramMap.put("cateCode", cateCode);
        }
        if(StringUtils.isNotEmpty(memSource)){
            paramMap.put("memSource", memSource);
        }
        if(StringUtils.isNotEmpty(expandId)){
            paramMap.put("expandId", expandId);
        }
        return dalClient.queryForList("exportCustomer.queryCustomer", paramMap, ExportCustomerVo.class);
    }

    /* (non-Javadoc)
     * @see com.suning.sawp.member.dao.ExportCustomerDao#queryCustormerForDd(java.lang.String, java.lang.String, java.lang.String)
     */
    @Override
    public List<ExportCustomerVo> queryCustormerForDd(String activityId, String storeCode,String dudaoId,String memSource,String expandId) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("activityId", activityId);
        paramMap.put("storeCode", storeCode);
        paramMap.put("dudaoId", dudaoId);
        if(StringUtils.isNotEmpty(memSource)){
            paramMap.put("memSource", memSource);
        }
        if(StringUtils.isNotEmpty(expandId)){
            paramMap.put("expandId", expandId);
        }
        return dalClient.queryForList("exportCustomer.queryCustomer", paramMap, ExportCustomerVo.class);
    }

}
